<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>登录页面</title>
	<link rel="stylesheet" type="text/css" href="__PRIVATE__/css/style.css">
	<script type="text/javascript" src="__PRIVATE__/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<div class="downloadBox1" style="text-align: center;margin-top: 200px;">代理商登录页面</div>
<div class="downloadBox">
	<div>账号：<input type="text" id="agent_name" placeholder="请输入账号">	</div>
	<div>密码：<input type="password" id="agent_password" placeholder="请输入密码">	</div>
	<div><input type="button" class="confirm" value="确 认"></div>
</div>

</body>
</html>
<script>
	$('.confirm').click(function() {
		if ( $("#agent_name").val()=='' ||  $("#agent_password").val()=='' ) {
			alert('请填写账号或密码');
			return false;
		}
		var savePostData = {
			agent_name	   :$("#agent_name").val(),
			agent_password :$("#agent_password").val()
		}
		$.post("{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/agent_login')}",savePostData,function(data){
			if (data.status) {
				alert(data.info);
				window.location.href = data.url;
			}else{
				alert(data.info);
			}
		});
	});
</script>
